package com.ruoyi.web.StateDemo.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.StateDemo.domin.ActivityOrder;
import com.ruoyi.web.StateDemo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/orderStateDemo")
public class ActivityStateController extends BaseController {
    @Autowired
    private OrderService orderService;


    @PutMapping("/payOrder")
    public AjaxResult payOrder(ActivityOrder activityOrder) {
        orderService.payOrder(activityOrder);
        return AjaxResult.success("支付成功");
    }
    @PutMapping("/validateOrder")
    public AjaxResult validateOrder(ActivityOrder activityOrder) {
        orderService.verificationOrder(activityOrder);
        return AjaxResult.success("核销成功");
    }

}
